package com.sunxd.zstudy.java8.lambda;

import java.util.function.BiFunction;

/**
 * @author sun.xd
 * @description: description
 * @date 2023/11/14 18:05
 */
public class TBiFunction {
    public static void main(String[] args) {

        BiFunction<String ,String ,String> biFunction1 = new BiFunction<String, String, String>() {
            @Override
            public String apply(String s, String s2) {
                return s + s2;
            }
        };
        String rs = biFunction1.apply("s1", "s2");
        System.out.println(rs);

        BiFunction<String ,String ,String> biFunction2 = (x,y) -> {
            return x + y;
        };
        rs = biFunction2.apply("s1", "s2");
        System.out.println(rs);

        BiFunction<String ,String ,String> biFunction3 = (x,y) ->  x + y;
        rs = biFunction3.apply("s1", "s2");
        System.out.println(rs);
    }
}
